package model

type GvImMessage struct {
	ID        uint   `json:"id" gorm:"primaryKey;not null;autoIncrement;comment:消息id"`
	RoomID    uint   `json:"room_id" gorm:"not null;comment:房间id"`
	UserID    uint   `json:"user_id" gorm:"not null;comment:用户id"`
	Data      string `json:"data" gorm:"comment:消息内容"`
	Type      int    `json:"type" gorm:"comment:消息类型"`
	CreatedAt int64  `json:"created_at" gorm:"autoCreateTime;comment:消息创建时间"`
	UpdatedAt int64  `json:"updated_at" gorm:"autoUpdateTime;comment:消息更新时间"`
}

func (GvImMessage) TableName() string {
	return "gv_im_message"
}
